﻿//-----------------------------------------------------------------------
// <copyright file="Extensions.cs" company="MKCoolsoft">
//     Copyright (c) mkcoolsoft. All rights reserved.
// </copyright>
// <author>Mario Kuhl</author>
// <revision>26.01.2014 Initial version</revision>
//-----------------------------------------------------------------------

namespace MKCoolsoft.GPXLib
{
    #region usings

    using System;
    using System.Collections.Generic;
    using System.Xml;
    using System.Xml.Serialization;

    #endregion usings

    /// <summary>
    /// You can add extend GPX by adding your own elements from another schema here. 
    /// </summary>
    public class Extensions
    {
        #region private fields

        /// <summary>
        /// You can add extend GPX by adding your own elements from another schema here.
        /// </summary>
        private List<XmlElement> extensionsField;

        #endregion private fields

        #region constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="Extensions"/> class.
        /// </summary>
        public Extensions()
        {
            this.extensionsField = new List<XmlElement>();
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Extensions"/> class.
        /// This "private" constructor is for hiding the public constructor for 
        /// serialize / deserialize
        /// </summary>
        /// <param name="dummy">This is a dummy parameter.</param>
        private Extensions(int dummy)
        { 
        }

        #endregion constructors

        #region public properties

        /// <summary>
        /// Gets or sets <c>Any</c> list of <c>xmlelements</c> from <c>extensions</c>.
        /// </summary>
        [XmlAnyElementAttribute]
        public List<XmlElement> Any
        {
            get
            {
                return this.extensionsField;
            }

            set
            {
                this.extensionsField = value;
            }
        }

        #endregion public properties
    }
}
